﻿using System;
namespace LeRenard.ScriptWars.Model.GridSystem
{
    /// <summary>
    /// Event arguments for the <see cref="GridCellValueChangedEventHandler"/>.
    /// </summary>    
    public sealed class GridCellValueChangedEventArgs<TValue> : EventArgs
    {
        /// <summary>
        /// Gets the previous value.
        /// </summary>
        public TValue PreviousValue { get { return _previousValue; } }
        private readonly TValue _previousValue;        

        /// <summary>
        /// Gets the new (current) value.
        /// </summary>
        public TValue NewValue { get { return _newValue; } }
        private readonly TValue _newValue;        

        /// <summary>
        /// Creates a new <see cref="GridCellValueChangedEventArgs"/> object.
        /// </summary>
        /// <param name="previousValue"></param>
        /// <param name="newValue"></param>
        public GridCellValueChangedEventArgs(TValue previousValue, TValue newValue)
        {
            _previousValue = previousValue;
            _newValue = newValue;
        }
    }
}
